﻿using Appliaction.Dto.DB;
using Domain.Entitys.DB;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Appliaction.IAppServices.DB
{
    public interface IDb_Product_TypeService
    {
        /// <summary>
        /// 条件分页查询产品分类信息
        /// </summary>
        /// <param name="currentPage">单前页</param>
        /// <param name="pageSize">查询页数</param>
        /// <param name="typeName">分类名称或分类编号</param>
        /// <param name="status">状态</param>
        /// <returns></returns>
        List<Product_Type_Tree> GetProduct_Types(int currentPage, int pageSize, string typeName, char status);

        /// <summary>
        /// 条件查询分类总数
        /// </summary>
        /// <param name="typeName"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        int Product_TypeCount(string typeName, char status);

        /// <summary>
        /// 检查同一分类下序号是不是唯一
        /// </summary>
        /// <param name="sort"></param>
        /// <param name="parentId"></param>
        /// <returns></returns>
        bool CheckSortUnique(int sort, int parentId, int proTypeId);

        /// <summary>
        /// 添加产品分类信息
        /// </summary>
        /// <param name="db_Product_Type"></param>
        /// <returns></returns>
        Task<int> Product_TypeAddAsync(Db_Product_TypeAddDto product_TypeAddDto);

        /// <summary>
        /// 修改产品分类信息
        /// </summary>
        /// <param name="db_Product_Type"></param>
        /// <returns></returns>
        Task<int> Product_TypeUpdateAsync(Db_Product_TypeUpdateDto product_TypeUpdateDto);

        /// <summary>
        /// 逻辑删除产品分类信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> Product_TypeDeleteAsync(List<Db_Product_TypeDelDto> product_TypeDelDto);

    }
}
